home *** CD-ROM | disk | FTP | other *** search
/ E.M.Computergraphic Phase 4 / Phase 4 - Desktop Video Dreams (E. M. Computergraphic)(1996).iso / utilities / jacosub / documentation / jscripts < prev    next >
Text File  |  1996-01-02  |  45KB  |  872 lines

  1. JACOsub 2.2 SCRIPT FILE FORMAT SPECIFICATION
  2. ============================================
  3.  
  4. Here is the complete JACOsub script file format specification.
  5. It's not complicated (unless you want it to be) and quite flexible.
  6. Check out the sample script (demo.js) that came with this software;
  7. it demonstrates many of the things you can do with a script.
  8.  
  9. The accompanying file QuickRef.doc is a summary of this document, providing
  10. brief descriptions of the commands, escape codes, and directives that you
  11. can put into a script.
  12.  
  13. This document is divided into six parts:
  14.      I.  Basic format conventions
  15.     II.  Compiler commands
  16.    III.  Timed lines
  17.     IV.  Directives (for controlling timed lines)
  18.      V.  Sample lines
  19.     VI.  Credits
  20.  
  21. Most of the information in this document is demonstrated by the timed
  22. script demo.js, which is included in the JACOsub distribution archive.
  23.  
  24.  
  25. I.  BASIC FORMAT CONVENTIONS
  26. -----------------------------
  27.  
  28. 1.  Space characters (white space) may consist of spaces or tabs.  Any line
  29.     in a script file may contain any amount of white space in front of,
  30.     behind, or in between parameters or words.
  31.  
  32. 2.  A line cannot be more than 511 characters in length (but you can
  33.     concatenate several lines; see "escape codes" below).
  34.  
  35. 3.  Lines in the file may be blank lines, compiler commands, or timed
  36.     lines for the script.  All these are explained below.
  37.  
  38. 4.  Blank lines or lines containing white space only are ignored.
  39.  
  40.  
  41. II.  COMPILER COMMANDS
  42. ----------------------
  43.  
  44. Any line where # is the first non-space character is treated as a compiler
  45. command.  The command is indicated by the next character (upper or
  46. lowercase) following the #.  Some commands have arguments, which are
  47. assumed to begin with the next non-whitespace characters following the
  48. command.  Anything shown here in square brackets [] are optional.
  49. The commands are:
  50.  
  51.    #       (followed by a space) Comment.  The line will be ignored.
  52.            Example:
  53.            # This is a comment.
  54.  
  55.    #C[LOCKPAUSE] <time>
  56.            While a script is running, this command forces the clock to
  57.            pause the clock at the time specified by <time>.  Pressing a key
  58.            will resume play.  <time> is an offset from the beginning of the
  59.            script in the form H:MM:SS.FF (hours:minutes:seconds.units).
  60.            The beginning time of a script is usually 0:00:00.00 unless the
  61.            script was included with an offset using the #I command.
  62.  
  63.            This command is useful for titling multiple laserdisc sides in
  64.            a single script.  Be warned:  There will be no indication on the
  65.            screen telling you that the script is paused!  You have to keep
  66.            track of your pauses yourself.
  67.  
  68.    #D[IRECTIVE][n] <directive string>
  69.            Change some directive defaults (see the Directives section
  70.            below), as in:
  71.            #DVB8C10    or    #directive3 hr50vmf2    or    #d9JLJBC
  72.            This command affects only those lines following it.  Scripts may
  73.            contain as many #D commands as you like.
  74.  
  75.            There are 21 default directives available for you to set.
  76.            Specifying #D is the same as #D0 -- this sets the general
  77.            overall default directive when a title line contains no
  78.            directive or when just the D directive is present.  The
  79.            directives D1 - D20 may be set for situations when you need a
  80.            shorthand way to represent a long complicated directive string
  81.            in many places in your script.  Directives D0-D20 are initially
  82.            all identical, according to your DIRECTIVE config setting.
  83.  
  84.    #F[ONT] <n> <fontname.font> <size> [CLEAN or QUICK&DIRTY]
  85.            This command sets font <n> to <fontname.font> which is <size>
  86.            pixels high.  CLEAN or QUICK&DIRTY indicate the rendering mode
  87.            for the font, and if omitted, the software will analyze the font
  88.            to determine the best mode.  Mono-color fonts will always be
  89.            QUICK&DIRTY, and color fonts will be CLEAN only if the
  90.            characters are designed to overlap.  Normally, you should NEVER
  91.            need to set the render mode unless you wish to override the
  92.            default.  The <n> argument may range from 0 to 9 if the software
  93.            has been registered, otherwise n may range from 0 to 3.  Font
  94.            settings affect the entire script.  #F commands should be
  95.            specified before any timed lines in your script.
  96.            Example: #F 2 Diamond.font 20 quick&dirty
  97.  
  98.    #I[NCLUDE] <time> <filename>
  99.            Include another script file <filename> into the current script,
  100.            offsetting the second script's start time by <time>.  <time> is
  101.            always FORWARD offset.
  102.  
  103.            This command is useful, for example, if you are subtitling a
  104.            series of TV shows having subtitles for credits and ending song
  105.            lyrics.  Rather than importing and/or re-timing the same
  106.            sequences over and over again for each episode, you need only
  107.            time the song lyrics once and the credits once, with the times
  108.            starting at zero, and save these two scripts as separate files.
  109.            When your "main" script includes these other scripts, they will
  110.            be incorporated properly into the main script to start at the
  111.            proper time (which is <time> added to the first time event in
  112.            the included script), and any overlapping time ranges will be
  113.            interwoven properly.
  114.  
  115.            <time> is specified in the form H:MM:SS.FF, where H is an hours
  116.            digit, M is a minutes digit, S is a seconds digit, and F is a
  117.            fractional-second digit.  The units of F are determined by the
  118.            #T command (below), and default to 30 units/second if the #T
  119.            command was omitted (that is, the FF digits are SMPTE units
  120.            ranging from 00 to 29).  The included script may in turn contain
  121.            its own, possibly different, #T command, and also its own
  122.            #I commands.  <time> always offsets the "includee" relative to
  123.            the beginning of the "includer," taking into account the
  124.            "includer's" own offset if the "includer" was itself included by
  125.            some other script.
  126.  
  127.            <filename> may be any valid path + file name.  <filename> can
  128.            specify a complete path; if no path is specified then JACOsub
  129.            will look in the default scripts directory, which you can set in
  130.            JACOsub.cfg  If you omit the extension in the filename, then
  131.            the program will include the script with the most recent
  132.            time-stamp, among the extensions .js, .tts, .pjs, or .tim (.jsc,
  133.            .pan, or .sub files won't be considered).  The file name must
  134.            not contain any spaces.
  135.  
  136.            Any occurrences of #F, #P, #Q, and #R in an included script will
  137.            be ignored.  These commands work only in the primary script, and
  138.            they affect all included scripts.  The effects of #D, #S, and #T
  139.            commands are passed down into included scripts, but these
  140.            commands inside an included script affect only that script and
  141.            others IT might include; they have no effect on the higher-up
  142.            "calling" scripts.
  143.  
  144.            Example: #I 0:21:44.16 scripts:kor/kor-credits.js
  145.  
  146.            On computers with small amounts of memory (1 megabyte or less),
  147.            you may find that the memory reallocation fragmentation that
  148.            occurs from having too many large included scripts may result in
  149.            a memory overflow error message.  If this happens, making your
  150.            largest script the root script should help.
  151.  
  152.    #P[ALETTE] <color> <r> <g> <b> [palette]
  153.            This sets the red, green, and blue intensities for color
  154.            register <color>, to <r>, <g>, and <b>, respectively.  This
  155.            command may be specified anywhere in the file, but the setting
  156.            will be used for the entire script.  Use intensities of 14 or 15
  157.            with caution, as these are stronger than normal video signals,
  158.            and can result in color bleeding when using in your genlocked
  159.            video signal.  Do not redefine color 2; JACOsub expects it to
  160.            remain black.
  161.  
  162.            The optional [palette] parameter defaults to 0, and indicates
  163.            the palette number in which to set the color.  JACOsub has 10
  164.            palettes available.  All 10 palettes are initialized to your
  165.            PALETTE settings in JACOsub.cfg.  0 is the primary palette.
  166.            Palettes 1 - 9 may be used to temporarily reset certain colors
  167.            for a particular display, using the CP directive.  If JACOsub is
  168.            using a 2-bitplane display, for example, you are restricted to 4
  169.            colors at any one time, but using multiple palettes allows you
  170.            to redefine them on the fly.
  171.            Examples:
  172.            #P1 14 14 6    # set color 1 to yellow, in default palette 0
  173.            #p 3 0 13 0 1  # set color 3 to green, in palette 1
  174.  
  175.    #Q[UANTIZE][n]
  176.            This command has the effect of eliminating timing gaps between
  177.            subtitles of less than [n] time units, as specified by the #T
  178.            command.  Default is #Q0.  Example:  With #t30 and #q2
  179.            specified, any time event less than 2/30 seconds earlier than
  180.            another time event will be rounded up to the later event.  This
  181.            is of questionable usefulness.  If this command occurs before a
  182.            #T command, then 30 units per second is assumed.  Subsequent #Q
  183.            commands replace earlier ones.  Only the last #Q command in a
  184.            script has any effect.
  185.  
  186.    #R[AMP] <seconds.units>
  187.            If you play a pre-timed script, and discover a time drift, then
  188.            use this command.  The parameter <seconds.units> is the amount
  189.            of drift to correct over the entire script.  Script timings will
  190.            be adjusted appropriately according to this value.  A positive
  191.            value will lengthen the total script running time, and a
  192.            negative value will shorten the total script running time.  The
  193.            default value is #R0.  The number after the decimal point is NOT
  194.            a fractional second; it is the number of time units specified by
  195.            #T.  THIS COMMAND MUST NOT OCCUR BEFORE A #T COMMAND.  Examples:
  196.            #R-3.60 will shorten the script running time 3 seconds plus 60
  197.            time units.
  198.            #R .92 will lengthen the script running time 92 time units.
  199.  
  200.            IMPORTANT:  Your genlock affects the computer's internal clock.
  201.                        If you find that you have to ramp a 30-minute script
  202.                        more than 10 seconds, then you have a bad problem
  203.                        with your genlock.  DO NOT TRY TO "FIX" THE PROBLEM
  204.                        WITH A BIGGER RAMP TIME!  Doing so will result in
  205.                        math overflows, causing sudden jumps in timing.
  206.  
  207.    #S[HIFT] <seconds.units>
  208.            The parameter <seconds.units> is the amount to shift each time
  209.            event in the script.  A positive value will delay each time, and
  210.            a negative value will advance each time.  The default value is
  211.            #S0.  The number after the decimal point is NOT a fractional
  212.            second; it is the number of time units specified by #T.  THIS
  213.            COMMAND MUST NOT OCCUR BEFORE A #T COMMAND.
  214.  
  215.            The first occurrence of #S in a script determines a global
  216.            amount of shift, even if the first #S appears AFTER some timed
  217.            lines.  Subsequent occurrences affect only those lines following
  218.            the #S.  You must take care that your #S commands do not cause
  219.            any times to be less than zero.  The Amiga uses unsigned
  220.            integers (always positive) for its internal representation of
  221.            times, meaning that a time "less than" zero is actually a very
  222.            large number!
  223.  
  224.            Example:  #S -0.20 will cause ALL events to occur 20 time units
  225.            sooner than usual, if this is the FIRST #S.  Otherwise, all
  226.            events SUBSEQUENT to this command will be shifted so that they
  227.            occur 20 units sooner.
  228.  
  229.    #T[IMERES] <n>
  230.            Time resolution; sets time units to <n> per second.  The default
  231.            is SMPTE units of 30 counts/second, as in #T30.  If your script
  232.            is in units 1/100 second units or PAL units, you must say so
  233.            with the appropriate command, before the subtitle text begins.
  234.            The #R or #S commands cannot precede a #T command.
  235.            Examples:  #t100
  236.                       #TIMERES 10
  237.  
  238.  
  239. III.  TIMED LINES
  240. -----------------
  241.  
  242. Timed lines for the script may occur in any order.  They look similar to
  243. this:
  244.  
  245.    H:MM:SS.FF H:MM:SS.FF directive {comment} text {comment} more text...
  246.  
  247. Here's what all those things are:
  248.  
  249. Start time and stop time
  250. ------------------------
  251. The first field is the time when the subtitle is to appear on the screen.
  252. The normal default is SMPTE format (that is, FF can range from 00 to 29).
  253. Use the #T command (described above) to define the units.  IMPORTANT: The
  254. FF digits represent time units, NOT fractions of a second.  There is a
  255. difference!  For example, if you use #T10 to specify 1/10 second time
  256. units, then a time such as 0:00:00.60 would be illegal (and result in an
  257. error) because it specifies 60 time units!  0:00:00.6 or 0:00:00.06 or
  258. even 0:00:00.00006 would be correct for this case -- 6 UNITS are specified,
  259. not 6 tenths of a second.
  260.  
  261. The second field is the time when the title is to disappear.
  262.  
  263. If you prefer, you do not have to use the H:MM:SS.FF format at all.
  264. Instead, you can substitute a @ symbol followed by a single integer to
  265. represent total time units.  For example, if #T30 is used to specify 1/30
  266. second units, then the 0:05:10.22 is the same as @9322.  This format is
  267. useful for representing times as video frame counts.  Many laserdisc
  268. players display times in this fashion.
  269.  
  270. Directive string
  271. ----------------
  272. The next field is the directive.  It is optional.  If you leave it out, the
  273. program will default to standard subtitling form (all text centered at the
  274. bottom of the screen or depending on how you have your global default
  275. directive set in your configuration).  The title text MUST begin with a
  276. non-alphabet character {such as a comment} if you omit the directive.
  277. Directives are explained fully in the DIRECTIVES section below.  The first
  278. non-whitespace character following  the directive is assumed to be the
  279. beginning of the subtitle text.
  280.  
  281. Inline comments
  282. ---------------
  283. The {comment} is considered a part of the subtitle text, but it is ignored
  284. by the software.  Use it for character names or keywords.  A comment must
  285. be enclosed in braces.  Comments may appear anywhere within the text of a
  286. subtitle.  If you really want to to display a left brace, precede it with a
  287. backslash like so: \{.  Right braces will be interpreted as a literal
  288. character or close of a comment, whichever seems appropriate.  If a
  289. whitespace character immediately follows a comment closing brace, then that
  290. first whitespace character will be ignored.  Any other kind of following
  291. character will be considered part of the subtitle text, and used.  Comments
  292. in the text are especially useful when translating foreign films -- we use
  293. them to list possible translations of phrases we are not yet sure about.
  294.  
  295. Title text
  296. ----------
  297. In the example above, the "text" and "more text" fields are what get
  298. displayed.  There are several special codes that you can put inside the
  299. text (CASE IS IMPORTANT HERE ONLY):
  300.  
  301.    \    Concatenate.  If the LAST character in a line is a backslash, then
  302.         JACOsub will concatenate the text on the next line to the text
  303.         in the current line.  Leading and trailing whitespace will be
  304.         stripped from the concatenated text, so you can indent it if you
  305.         wish.
  306.  
  307.    \n   Newline.  This is like a carriage return.  A line containing this
  308.         code will be split at the \n.  Each of these new fragments will
  309.         then be word-wrapped separately unless you turn wordwrapping off
  310.         (see the W directive below).  Useful for general formatting.
  311.         Multiple \n codes may be concatenated to create blank lines.
  312.         Example:  Hello!\n\nHow are you?{blank line separating the two}
  313.  
  314.    \{   Display a left brace.  Left braces are normally used to indicate
  315.         the beginning of a comment.
  316.  
  317.    \~   Display a tilde.  Tildes are normally used to create "hard" spaces
  318.         (see below).
  319.  
  320.    \\   Display a backslash.  Backslashes are normally used to denote these
  321.         special codes.
  322.  
  323.    \N   Normal.  All text appearing after this code will be displayed in
  324.         "normal" style.  This is typically the default, unless you have the
  325.         style (S) directive set to something other than normal.
  326.  
  327.    \I   Italics.  Display all text appearing after this code in italics.
  328.         Example:  \IHello!\N\nHow are you?{Hello is in italics}
  329.  
  330.    \B   Boldface.  This one isn't particularly useful, but go ahead if you
  331.         feel like it.
  332.  
  333.    \U   Underline.  This is virtually useless for large color text.
  334.  
  335.    \Cn  Color n.  The text following this code will be displayed using face
  336.         color n.  n is a hexadecimal digit; it may take the values 0-9 or
  337.         A-F (or a-f).  Typically, when using the font supplied with this
  338.         software on a 2-bitplane display, only colors 3 and 1 are useful.
  339.         See the CF directive below for some caveats about colors.
  340.  
  341.    \Fn  Font n.  The text following this code will be displayed using font
  342.         number n.  n may range from 0 to 9 (or 0 to 3 if the program is
  343.         not registered).  Normally you would use the F directive to set the
  344.         default font for a line; use this escape code to override it.
  345.  
  346. THE LAST 6 CODES ABOVE AFFECT ONLY ONE TIMING LINE; their effects do not
  347. carry over into other lines.  These codes override any directives.  The \I,
  348. \B, and \U codes are mutually exclusive:  You can have bold text or italic
  349. text, but you cannot create text that is BOTH bold and italic.  See the 
  350. demo script file (demo.js) for good examples on usage.
  351.  
  352. Leading or trailing space in subtitle text will be ignored.  If you want to
  353. encode a true space on the ends of some text, use a tilde (~).  It will be
  354. displayed as a space.  To actually display a tilde, precede it with a
  355. backslash: \~.  Tildes may also be used to create "hard"spaces; they will
  356. be displayed as spaces but text will not be word-wrapped on these spaces.
  357.  
  358. White space between line arguments may consist of any amount of spaces or
  359. tabs.  Each tab character inside the subtitle text will be converted to a
  360. space character.
  361.  
  362.  
  363. IV.  DIRECTIVES
  364. ---------------
  365.  
  366. Directive strings were briefly described above, but there are so many that
  367. they deserve to be allocated a whole section of this document.  So be it.
  368.  
  369. A directive is a series of character codes strung together.  A directive
  370. determines a subtitle's position, font, style, color, and so forth.  Each
  371. character code begins with an alphabet character followed by arguments made
  372. up of other alphabet characters and numbers.  Directives may contain any of
  373. the following codes, in any order.  The directives may be uppercase or
  374. lowercase.  Like the text codes above, directives only affect a SINGLE
  375. timing line; their effects do not carry over into other lines.  Any
  376. parameters shown here in square brackets [] are optional.
  377.  
  378. Vertical positioning
  379. --------------------
  380.  
  381.     VB[n]  Bottom.  Position last line at the bottom (default).  The offset
  382.            from the bottom of screen n is optional  - it says how many
  383.            raster lines to offset from the physical bottom-of-viewport.  VB
  384.            by itself is the same as VB16 (in the original distribution of
  385.            this software).  The default value of n can be changed using the
  386.            DIRECTIVE setting in JACOsub.cfg, or with the #D command.
  387.  
  388.     VHn    Line height (i.e. spacing), where n is the percentage of the
  389.            font height to use for line spacing.  Default is 100 (single-
  390.            spaced).  Using 200 would result in double-spaced lines.  n may
  391.            range from -32768 to 32767, although the useful range is
  392.            probably more like 50 to 500.
  393.  
  394.     VLn    line n. Position subtitle starting at text line n (the height
  395.            of a line depends on the font you use).  n=0 is the top line.
  396.  
  397.     VM     Middle.  Text will be centered vertically in the area defined by
  398.            the VTn and VBn directives.
  399.  
  400.     VPn    Pixel n. Position subtitle so that the font baseline of the
  401.            first line of text is n pixels from the top of the viewport.
  402.            You need to know your font's baseline position for this
  403.            directive to be of any use.  The mouse-positioning operation in
  404.            the script editor creates directives like this.
  405.  
  406.     VSn    Not yet implemented; doesn't do anything yet.  Don't ask.
  407.  
  408.     VT[n]  Top.  Position the title with the first line at the top.  The
  409.            offset n is optional - as with VB, VT by itself is the same as
  410.            VT16 in the original distribution of this software.
  411.  
  412.     VU     Continue this line directly Underneath the previous one.  This
  413.            is useful if you have to display more text than your editor will
  414.            allow on a line.  You can also use it to create interesting
  415.            effects when a line with the VU directive is timed so that it's
  416.            not on the same display as the previous line.  For example,
  417.            suppose you had a single line that used the VM directive.
  418.            Normally it would be perfectly centered vertically on the screen.
  419.            However, if a VU line follows it, both are positioned as if they
  420.            were a block of lines to be centered on the screen together; i.e.
  421.            the VM line will appear slightly above center and the VU line
  422.            will appear slightly below center, regardless of when they are
  423.            individually displayed.  Had VB been used instead of VM, the
  424.            first line would have appeared 1 text line higher than bottom,
  425.            just enough to make room for the second line.
  426.  
  427. Horizontal positioning
  428. ----------------------
  429.  
  430.   Margins:
  431.  
  432.     HLn    Left margin.  Set left margin at a position that is n% of the
  433.            the screen width.  Default is HL1 (1% from left edge).
  434.  
  435.     HRn    Right margin.  Set the right margin at a position that is n% of
  436.            the screen width.  Default is HL99 (1% from right edge).  The
  437.            right margin MUST be greater than the left margin.
  438.  
  439.   Text justification:
  440.  
  441.     JC     Center.  Text is centered within H constraints (normal default).
  442.  
  443.     JL     Left.  Align left edge of text at the HLn margin position.
  444.  
  445.     JR     Right.  Align the right edge of text at the HRn margin position.
  446.  
  447.   Block justification:
  448.  
  449.     JBC    Justify block center.  Because of word-wrapping, the width of a
  450.            text block will never occupy the full width specified in your
  451.            margin settings.  This directive positions the imaginary
  452.            rectangle occupied by the text in the center of your margin
  453.            settings, regardless of the text justification directives.  For
  454.            example, the JL directive by itself might produce the following
  455.            effect (the | character indicates margin boundaries):
  456.  
  457.            | The quick brown fox                      |
  458.            | jumped over the lazy dog.                |
  459.  
  460.            but the JL directive together with JBC will preserve the text
  461.            justification but center the block of text between the margins:
  462.  
  463.            |        The quick brown fox               |
  464.            |        jumped over the lazy dog.         |
  465.  
  466.            AnimEigo products have their subtitles displayed this way.
  467.  
  468.     JBF    Justify block full (default).  Text will be positioned according
  469.            to whatever text justification directives are in effect, using
  470.            the full width specified by the current margin settings.
  471.  
  472.     JBL    Justify block left.  Position the text block at the left margin.
  473.  
  474.     JBR    Justify block right.  Position the text block so that the right
  475.            edge is at the right margin.
  476.  
  477.   Word wrapping:
  478.  
  479.     W0     Disable automatic word wrapping.  This may result in your text
  480.            not fitting within the position constraints defined with H & V.
  481.            There is really NO reason at all why you would want to turn off
  482.            word wrapping; you can wrap words manually with the \n code
  483.            whether word wrapping is on or off.  This directive is here just
  484.            for the sake of completeness.
  485.  
  486.     W1     Automatic "smart" word wrapping (default).  Even if a your text
  487.            contains hard return codes, the separate substrings will be word-
  488.            wrapped if necessary.  This word wrapping mode uses a "smart"
  489.            algorithm that attempts to minimize the area of the screen
  490.            occupied by the title.  In this mode, you will never see a line
  491.            wrapped as shown (the | characters indicate margin boudaries):
  492.  
  493.            | The quick brown fox jumped over the lazy |
  494.            |                   dog.                   |
  495.  
  496.            Instead, the W1 alghorithm will attempt to minimize the text
  497.            area without using any extra lines, resulting in:
  498.  
  499.            |           The quick brown fox            |
  500.            |        jumped over the lazy dog.         |
  501.  
  502.            This is easier for the viewer to read.  Same margins, same
  503.            number of lines, but the lines are more equal in length.
  504.  
  505.     W2     Automatic "stupid" (generally known as "greedy") word wrapping.
  506.            If you are disconcerted by words not completely filling the
  507.            horizontal margin space, and you don't mind having a single word
  508.            hanging by itself on the last line (as in the first W1 example
  509.            above), then use this directive.  This is the standard
  510.            text-editor wordwrap algorithm, which makes no attempt at
  511.            aesthetics.  Why anybody would want to use this is beyond me,
  512.            but here it is.  \n codes behave the same as with W1.
  513.  
  514. Fonts
  515. -----
  516.  
  517.   Font rendering:
  518.  
  519.     Fn     Use font n, where n is a number from 0 to 9 (JACOsub loads
  520.            four fonts, which you can specify in the file JACOsub.Config).
  521.            The usual default font is 0, which is what you should use as
  522.            your "primary" font.  Fonts 4-9 are unavailable if the software
  523.            is unregistered.
  524.  
  525.     FQ     Quick&Dirty text.  Text color 3 is always quick.  Other colors
  526.            must normally be rendered one character at a time to avoid
  527.            interference between the shadow and face color, but only when
  528.            the font is designed with overlapping characters.  This
  529.            interference happens because of a fault in the way the Amiga
  530.            renders text.  The FQ directive forces all text on a line to be
  531.            rendered in quick mode as if it were color 3.
  532.  
  533.            You should never need to use the FQ directive.  The program is
  534.            smart enough to determine when a font can be quick&dirty.  For
  535.            example, JACOsub's 32- and 36-pixel fonts will default to clean
  536.            mode because they have overlapping characters, but the 32-pixel
  537.            font will default to Quick&Dirty because its characters do not
  538.            overlap.
  539.  
  540.     FC     Clean rendering.  Only color 3 will be rendered fast, other
  541.            colors will be rendered so that the face color is not disturbed.
  542.            You can use this directive to negate, on a single line, a global
  543.            FF directive set using the #D command, or to override a
  544.            QUICK&DIRTY setting in JACOsub.cfg.  Normally it's never needed.
  545.  
  546.            The demo script demo.js tricks JACOsub into generating "slow"
  547.            clean text in the foreground display so you can see how it is.
  548.            If you are curious to see how the Amiga messes up color 1 text
  549.            if it's displayed the quick way, run the demo after inserting
  550.            the global command #DFQ at the top of the file demo.js before
  551.            you play the demo.
  552.  
  553.     FD     Default text rendering.  Rendering will be "quick" or "clean"
  554.            depending on how your font was set up in your configuration.
  555.            This directive is useful for overriding a #DFC or #DFF command.
  556.  
  557.     FOn[:a]  Generate an outline around the font, n pixels wide.  Color 2
  558.            (JACOsub's outline color) is used to generate the outline.  This
  559.            directive is useful for transforming a plain mono-color Amiga
  560.            font into a nice titling font, especially when combined with the
  561.            FS (font shadow) directive.  Recommended value for n is 2, which
  562.            produces a nice flicker-free outline.  n must be less than 127.
  563.            The default value is zero.
  564.  
  565.            The optional :a suffix indicates a color to use for anti-
  566.            aliasing.  This defaults to the ANTIALIASCOLOR setting in your
  567.            JACOsub.cfg file, or 2 (no antialiasing) if this setting is
  568.            missing from the file.
  569.  
  570.            WARNING:  Generating outlines can slow the program down
  571.            considerably!  It is recommended that you use this directive
  572.            only with QUICK&DIRTY font rendering, preferably with mono-color
  573.            fonts.  An antialias color other than 2 will also slow it down.
  574.  
  575.     FSdn   Generate a font shadow, taking into account any existing font
  576.            outline, in direction d, and n pixels deep.  Color 2 (JACOsub's
  577.            shadow color) is used to generate the shadow.  The direction d
  578.            is specified as compass directions: N, S, E, W, NW, NE, SW, SE.
  579.            Good values to use for the shadow depth n are 2 - 5.  The
  580.            warning about font outlines above applies here also.
  581.  
  582.            Example: FSSE3 produces a shadow similar to the JACOsub 32-
  583.            pixel font, with the shadow extending down and to the right.
  584.  
  585.   Font style (may also be set with \ codes in the title text):
  586.  
  587.     SN     Normal style (typical default).
  588.  
  589.     SI     Italic.
  590.  
  591.     SB     Bold (using the JACOsub font, this doesn't look good with colors
  592.            other than color 3).
  593.  
  594.     SU     Underline (ugly!  Not recommended).
  595.  
  596.   Font color (CFn may also be set with text codes):
  597.  
  598.     CFn    Use color register n for the face color of the font.  JACOsub
  599.            assumes that all color fonts use bitplane 0 (i.e. color 1) for
  600.            the face color, and bitplane 1 (i.e. color 2) for the shadow/
  601.            outline.  THIS IS IMPORTANT!  JACOsub will generate text
  602.            differently depending on the color selected (see FF above).
  603.            The foreground color may also be set using the \Cn code inside
  604.            the text.
  605.  
  606.     CBn    Use color register n for the background color.  The display
  607.            will be cleared to this color prior to building the text.  If
  608.            two lines share the same display, and they have different
  609.            background colors specified, the screen will be cleared using
  610.            the latest NON-ZERO background color that occurs for that
  611.            display.  In other words, non-zero colors override the default
  612.            zero (transparent) background color.
  613.  
  614.     CPn    Use color palette n for this display.  Default value of n is 0,
  615.            which is the primary color palette normally used by JACOsub.
  616.            The values of n may range from 0 to 9, for a total of 10 color
  617.            palettes.  All 10 palettes are initialized to the PALETTE
  618.            settings in your JACOsub.cfg file, and they can be modified with
  619.            the #P script command.
  620.  
  621.            Because the palette is loaded immediately following a video
  622.            buffer switch, the new imagery on the display will appear with
  623.            the old palette momentarily.  If this is too noticeable, then
  624.            you should precede your alternate-palette lines with a "dummy"
  625.            short-duration blank screen (containing a hard space) using your
  626.            alternate palette, as in this example:
  627.  
  628.            0:00:12.20 0:00:12.22 cp2 ~{palette 2 on blank screen, .02 sec}
  629.            0:00:12.22 0:00:14.50 cp2 This will appear with the new palette.
  630.  
  631.     CS[L]n[:s[:c]] This causes text to appear inside a shaded rectangle.
  632.            The rectangle will be large enough to contain the text with a
  633.            margin of n pixels on all sides.  The shading is user-defined
  634.            (with the SHADEPATTERN setting in JACOsub.cfg) if s=0, or solid
  635.            if s=1.  Color c will be used for the rectangle.  The style (s)
  636.            and color (c) paramters are optional; not setting them uses the
  637.            defaults, normally s=0, c=2 (user-defined, black).
  638.  
  639.            Setting n=0 disables the shading.  We suggest using n=8 or more.
  640.            Without the L parameter described below, only ONE shaded
  641.            background rectangle will appear on the screen; that is, JACOsub
  642.            will attempt to create a SINGLE box which contains ALL text that
  643.            uses the CS directive and shares the same display.  If two
  644.            shading directives for the same time range conflict, one of them
  645.            will be used, but predicting WHICH one is impossible!  The
  646.            normal default setting is CS0:0:2, which can be changed using
  647.            the #D command or the DIRECTIVE setting in JACOsub.cfg.
  648.  
  649.            The optional L parameter causes each text segment (which might
  650.            be split by wordwrapping) to be shaded in its own rectangle.
  651.            This looks ugly for a block of wordwrapped text, but it is
  652.            useful for shading separate single lines that overlap in time.
  653.  
  654.            Notes:  Setting VB0 will mean that bottom-positioned text is as
  655.            low as it will go, therefore no shading can appear below it.
  656.            You should set the VB directive so that there is room for the
  657.            shading rectangle to extend below the text.  Also, VB text will
  658.            be repositioned slightly higher when the running clock is
  659.            displayed during play, but shade boxes will NOT be repositioned.
  660.  
  661. Genlock fader control
  662. ---------------------
  663.  
  664.     GBn[Tm] Move the background slider control to n% saturation over a time
  665.            period of m/60 seconds of time.  n may range from 0 to 100.  If
  666.            time specifier is omitted, it defaults to 0 (i.e. instant).
  667.            Example:  GB63T120 slides the background fader to 63% saturation
  668.            in 2 seconds (120/60 seconds).
  669.  
  670.     GGn[Tm] Move the graphics slider control to n% saturation  over a time
  671.            period of m/60 seconds of time.
  672.  
  673.         >> DO NOT USE THE G DIRECTIVES WITH THE GLOBAL #D COMMAND OR IN
  674.            JACOsub.Config, or the genlock will be have control signals sent
  675.            to it at every time event.
  676.  
  677. IFF graphic files
  678. -----------------
  679.  
  680.       IL <ILBM file name> [<x offset %> <y offset %>]
  681.            Load an IFF ILBM file (typically a brush file) into a video
  682.            buffer for the time interval specified by the start and stop
  683.            time.  When this directive appears, JACOsub assumes that the
  684.            remainder of the line is information about the file, NOT title
  685.            text.  The file name must follow the directive string.  The
  686.            position to display the image, specified as percent of screen
  687.            width and height from the center, can be specified in the next
  688.            two fields.  These position coordinates default to 0 0 if they
  689.            are omitted, which results in the picture being centered on the
  690.            screen.  The picture may be positioned to extend beyond the
  691.            display edge.
  692.  
  693.            Any IFF ILBM picture or brush may be specified.  As many as
  694.            40 images may be loaded onto a single screen.  This enables you
  695.            to create several small brushes and display them all at once, in
  696.            different areas of the screen.
  697.  
  698.            CAVEATS (READ CAREFULLY!):
  699.            1.  You need at least AmigaDOS 2.0 to use this directive.  Under
  700.                1.3 and below, this directive is ignored.  You can possibly
  701.                get it to work under 1.3 if you install the iffparse.library
  702.                from AmigaDOS 2.0 in your libs: directory.
  703.            2.  You will not be informed if a file is too big to fit in
  704.                memory.  If this happens, the file will simply not load.
  705.            3.  If the IFF file contains more bitplanes than the JACOsub
  706.                video buffers, the EXTRA BITPLANES WILL BE IGNORED.  You may
  707.                change the number of JACOsub's bitplanes in JACOsub.cfg.
  708.                If you have JACOsub set for a 4-color (2-bitplane) screen,
  709.                and you try to load in a 16-color (4-bitplane) picture, you
  710.                will lose 2 biplanes of information, and the picture will
  711.                look strange when it appears.
  712.            4.  All pictures are treated as IFF brushes.  Therefore, your
  713.                picture, once loaded, will use JACOsub's color palette.  THE
  714.                PICTURE'S OWN COLOR PALETTE WILL BE IGNORED.  Create your
  715.                graphics using the SAME palette you use with JACOsub or the
  716.                picture will look strange when it appears.  If you want to
  717.                load a picture with its own colors, use the IS directive
  718.                (but then you won't be able to display text on top of it).
  719.            5.  JACOsub attempts to load the IFF files as they are needed.
  720.                This can cause a slight video switch delay if a time event
  721.                occurs while a file is loading, even though the IFF loading
  722.                routines do make clock checks.  Keep your IFF images on a
  723.                fast hard disk, or better yet, in RAM:.  If you do not have
  724.                sufficient memory, then do not use this directive!
  725.  
  726.       IS <ILBM file name>
  727.            Load an IFF ILBM file into its own screen, with its own
  728.            resolution and colors.  This screen will temporarily replace
  729.            one of the video buffers.  As with IL, JACOsub assumes that the
  730.            text following the IS directive contains the file name to load.
  731.            JACOsub will attempt to center the picture on your screen.
  732.  
  733.            Caveats 1, 2, and 5 above apply here also, and the IS directive
  734.            has some additional considerations:
  735.  
  736.            1.  You cannot display text on top of a picture loaded with
  737.                the IS directive.  Use the IL directive for this.
  738.            2.  The time ranges associated with an IFF screen should NOT
  739.                overlap any other time ranges.  If they do, the start times
  740.                have priority over the end times.
  741.            3.  The IS directive can tax your memory even more severely than
  742.                the IL directive, especially if you load a pictures like
  743.                hi-res HAM images to substitute every video buffer.
  744.            4.  We observe difficulty loading Extra-Halfbrite pictures.
  745.                Try it for yourself.  HAM images seem to work OK.
  746.  
  747.         >> DO NOT USE THE I DIRECTIVES WITH THE GLOBAL #D COMMAND OR IN
  748.            JACOsub.cfg.
  749.  
  750. ARexx communications
  751. --------------------
  752.  
  753.       RX <ARexx script name>
  754.            Execute the ARexx script name that follows the RX directive.
  755.            You should not specify other directives on the same line.  Only
  756.            one RX directive may be specified per time event -- that is, if
  757.            you have several lines all sharing the same start time, no more
  758.            than one of them may contain an RX directive.  If more than one
  759.            RX directive is specified for a given start time, the one that
  760.            occurs latest in the script will be used.  The end time for the
  761.            line is ignored, but should be larger than the start time to
  762.            avoid a compiler warning.  Try to make the end time equal to the
  763.            next nearest start time to avoid creating unnecessary video
  764.            frames.
  765.  
  766.         >> DO NOT USE THE RX DIRECTIVE WITH THE GLOBAL #D COMMAND OR IN
  767.            JACOsub.cfg.
  768.  
  769. Default directives
  770. ------------------
  771.  
  772. Because all of the above directives are optional, there is one other set of
  773. directives that may be used when you do not wish to specify any:
  774.  
  775.     D or D0   Default.  To be used if no other directives are used.  You
  776.            don't even need this directive at all, if your text begins with
  777.            a non-alphabetic character (such as a {comment}, number, etc.).
  778.  
  779.            Specifying D (or nothing) will use the program's default
  780.            settings.  The default directive for JACOsub is normally
  781.  
  782.            HL1HR99VH100VT16VB16JCJBFW1F0FDFO0:2FSSE0SNCF3CB0CP0CS0:0:2
  783.  
  784.            which you can change in the file JACOsub.Config, or with a #D
  785.            command at the top of your script.  Confused?  Here they are
  786.            spaced out:
  787.  
  788.            HL1 HR99 VH100 VT16 VB16 JC JBF W1
  789.            F0 FD FO0:2 FSSE0 SN CF3 CB0 CP0 CS0:0:2
  790.  
  791.            The IFF directives and the Genlock directives should NEVER be
  792.            specified globally, nor in JACOsub.Config.
  793.  
  794.     Dn     The directives D1 - D20 may be defined with the commands
  795.            #D1 - #D20.  You can use these "default" directives as shorthand
  796.            for more complex directives that you may need in many places.
  797.            If you put two D directives in the same directive string, the
  798.            latest one will be used, and any previous directives ignored.
  799.  
  800. If a directive string contains conflicting information, the information
  801. occurring last will be used.  For example, VTD will cause VT to be ignored
  802. in favor of the default.  In the directive CF10JLCF3, CF10 will be ignored
  803. in favor of CF3.  Naturally, any directive beginning with D is unaffected
  804. by the D.  In the long default directive above, you can see VT16VB16.  This
  805. serves to set the top-of-screen offset to 16 for later, and then sets the
  806. default vertical positioning will be 16 pixels from the bottom of the
  807. viewport.
  808.  
  809.  
  810. V.  SAMPLE LINES
  811. ----------------
  812.  
  813. These 4 lines all have the same effect.  Note that any spaces after the
  814. directive and the first space after comments are ignored.
  815.  
  816. 0:00:10.11 0:00:12.00 D  {fudo-ikiteru} It's alive!
  817. 0:00:10.11 0:00:12.00 D  {fudo-ikiteru}It's alive!
  818. 0:00:10.11 0:00:12.00 D  It's alive!{line doesn't start with a comment}
  819. 0:00:10.11 0:00:12.00    {fudo-ikiteru} It's alive!{starts with a comment}
  820.  
  821. If you want leading/trailing spaces, all of these lines will do the same
  822. thing (put two spaces in front of and after the text):
  823.  
  824. 0:00:10.11 0:00:12.00 D  ~~{fudo-ikiteru} It's alive! ~
  825. 0:00:10.11 0:00:12.00 D  {fudo-ikiteru}~~It's alive!~~
  826. 0:00:10.11 0:00:12.00 D  {fudo-ikiteru} ~~It's alive!~~
  827. 0:00:10.11 0:00:12.00 D ~ It's alive!~~
  828. 0:00:10.11 0:00:12.00 ~~{fudo-ikiteru} It's alive! ~
  829. 0:00:10.11 0:00:12.00  {fudo-ikiteru}~ It's alive!~~
  830. 0:00:10.11 0:00:12.00  {fudo-ikiteru} ~~It's alive!~~
  831. 0:00:10.11 0:00:12.00  {fudo-ikiteru}   It's alive!~~
  832.  
  833. THE FOLLOWING LINE IS BAD.  It needs either a directive after the timing
  834. numbers, or a comment to indicate that subtitle text follows the timing
  835. numbers.  Any alphabet character (A-Z, a-z) following the timing numbers
  836. MUST be part of a directive.
  837.  
  838. 0:00:10.11 0:00:12.00  It's alive!
  839.  
  840. For the next line, use color 1 for the font face color, start the
  841. subtitle at the top of the screen and leave the other defaults alone,
  842. and cause one word to be displayed in italics:
  843.  
  844. 0:02:23.23 0:02:25.01 cf1vt {thug1-nani} Whaddaya \Imean\N, ``please?''
  845.  
  846. Note:  Normal quotation marks ("like this") may be used, but using a
  847. double grave and a double apostrophe, as in the line above, looks more
  848. professional on the screen.  Just make sure that the grave looks like an
  849. upside-down apostrophe in your font, and that both characters occupy a
  850. narrow space.  The JACOsub fonts are designed this way.
  851.  
  852. Additional note (THIS IS ONE OF THE BIG FEATURES OF JACOsub):
  853. Timings may overlap!  The software will handle overlapping text displays
  854. properly, but you must be sure to position your subtitles so that these
  855. separate text events do not physically overlap on the screen.  You can
  856. arrange timed lines in any order you want, separate overlapped events
  857. into groups, or whatever.  The program will handle it.
  858.  
  859.  
  860. VI.  CREDITS
  861. ------------
  862.  
  863. The original JACOsub format was dreamed up by Alex Matulich and Daric
  864. Koslowski, before any code was ever written for JACOsub.  Yes, this was the
  865. second step!  (The first was to create the fonts.)  Beta testers and users
  866. have been very helpful in expanding and improving the specification into
  867. what it is today.  User feedback has played a large role in the development
  868. of the software and the script format.  The entire JACOsub project has been
  869. largely user-driven.
  870.  
  871. End of JScripts.doc.
  872.